{namespace vh=In2code\Powermail\ViewHelpers}
<f:layout name="Backend" />


	Show Backend Module: Converter
	{oldForms}         Powermail 1.x Forms


<f:section name="content">

	<h1><f:translate key="BackendSelectionConverterTitle" /></h1>
	<h2><f:translate key="BackendSelectionConverterTitle2" /></h2>
	<p><f:translate key="BackendSelectionConverterTitle3" /></p>
	<p><f:translate key="BackendSelectionConverterTitle4" /></p>

	<f:flashMessages class="powermail_message" />

	<div class="powermail_converter">
		<f:if condition="{oldForms}">
			<f:then>
				<f:form name="converter" class="converterForm" action="converterUpdateBe">
					<div class="converterFormField">
						<label for="save"><f:translate key="BackendConverterFormSave">Save new forms on page with PID</f:translate>:</label>
						<f:form.textfield id="save" property="save" value="[samePage]" />
					</div>
					<div class="converterFormField">
						<label for="defaultReceiverName"><f:translate key="BackendConverterFormDefaultReceiverName">Default Receiver Name</f:translate>:</label>
						<f:form.textfield id="defaultReceiverName" property="defaultReceiverName" value="Powermail" />
					</div>
					<div class="converterFormField">
						<label for="defaultSenderNameConfirmationMail"><f:translate key="BackendConverterFormDefaultSenderNameConfirmationMail">Default Sender Name for Confirmation Mail</f:translate>:</label>
						<f:form.textfield id="defaultSenderNameConfirmationMail" property="defaultSenderNameConfirmationMail" value="Administrator" />
					</div>
					<div class="converterFormField">
						<label for="defaultSenderEmailConfirmationMail"><f:translate key="BackendConverterFormDefaultSenderMailConfirmationMail">Default Sender Email for Confirmation Mail</f:translate>:</label>
						<f:form.textfield id="defaultSenderEmailConfirmationMail" property="defaultSenderEmailConfirmationMail" value="info@domain.org" />
					</div>
					<div class="converterFormField">
						<label for="parseFunc"><f:translate key="BackendConverterFormDefaultParseFunc">RTE ParseFunc Path in TypoScript (without prefix lib.).</f:translate>:</label>
						<f:form.textfield id="parseFunc" property="parseFunc" value="parseFunc_RTE." />
						<div class="troubleText"><f:translate key="BackendConverterFormDefaultParseFuncTroubleText">Clear this value if you have trouble with converting.</f:translate></div>
					</div>
					<div class="converterFormField">
						<label for="hidden"><f:translate key="BackendConverterFormHidden">Ignore Old Hidden Forms</f:translate>:</label>
						<f:form.checkbox id="hidden" property="hidden" checked="checked" value="1" />
					</div>
					<div class="converterFormField">
						<label for="dryrun"><f:translate key="BackendConverterFormDryrun">Do only a Test Run</f:translate>:</label>
						<f:form.checkbox id="dryrun" property="dryrun" checked="checked" value="1" />
					</div>
					<div class="converterFormField">
						<label for="submit">&nbsp;</label>
						<f:form.submit id="submit" value="convert all forms now" onclick="if (!confirm('Are you really sure?')) return false;" />
					</div>
					<div class="clear"></div>
				</f:form>



				<table cellspacing="0" cellpadding="0" border="0" class="typo3-dblist">
					<tbody>

					<tr class="c-table-row-spacer">
						<td nowrap="nowrap" class="col-icon"><img width="1" height="8" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class=""><img width="230" height="1" alt="" src="clear.gif"></td>
						<td nowrap="nowrap" class="" width="10"><img width="1" height="1" alt="" src="clear.gif"></td>
					</tr>
					<tr class="t3-row-header">
						<td nowrap="nowrap" class="col-icon">&nbsp;</td>
						<td nowrap="nowrap" colspan="8">
							<f:count subject="{oldForms}" />
							<span class="c-table">
								<f:translate key="BackendConverterOldForms">Old Forms (tt_content)</f:translate>
							</span>
						</td>
						<td nowrap="nowrap" class="col-icon">&nbsp;</td>
					</tr>
					<tr class="c-headLine">
						<td nowrap="nowrap" class="col-icon">
							&nbsp;
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterTtContentUid">Uid</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterPage">Pid</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterLanguage">Language</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterTitle">Title</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterRecipient">Recipient</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterSubject">Subject</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterFieldsetAmount">Number of Fieldsets</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterConfirmationPage">Confirmation Page</f:translate>
						</td>
						<td nowrap="nowrap" class="col-title">
							<f:translate key="BackendConverterMultiple">Multiple</f:translate>
						</td>
					</tr>

					<f:for each="{oldForms}" as="form" iteration="iteration">
						<tr class="db_list_normal firstcol powermail_listbe_overview">
							<td nowrap="nowrap" class="col-icon">
								<span class="t3-icon t3-icon-tcarecords t3-icon-tcarecords-tx_powermail_domain_model_forms t3-icon-tx_powermail_domain_model_forms-default{f:if(condition:'{form.hidden}',then:' transparent')}" title="id={form.uid}">&nbsp;</span>
							</td>
							<td nowrap="nowrap" class="col-title">
								{form.uid}
							</td>
							<td nowrap="nowrap" class="col-title">
								<span title="{vh:Getter.GetPageNameFromUid(uid:form.pid)}">
									{form.pid}
								</span>
							</td>
							<td nowrap="nowrap" class="col-title">
								{form.sys_language_uid}
								<f:if condition="{form.sys_language_uid} > 0">
									(Parent Uid: {form.l18n_parent})
								</f:if>
							</td>
							<td nowrap="nowrap" class="col-title">
								<span title="{form.tx_powermail_title}">
									<f:format.crop maxCharacters="30" append="&nbsp;[...]">{form.tx_powermail_title}</f:format.crop>
								</span>
							</td>
							<td nowrap="nowrap" class="col-title">
								<span title="{form.tx_powermail_recipient}">
									<f:format.crop maxCharacters="30" append="&nbsp;[...]">{form.tx_powermail_recipient}</f:format.crop>
								</span>
							</td>
							<td nowrap="nowrap" class="col-title">
								<span title="{form.tx_powermail_subject_r}">
									<f:format.crop maxCharacters="30" append="&nbsp;[...]">{form.tx_powermail_subject_r}</f:format.crop>
								</span>
							</td>
							<td nowrap="nowrap" class="col-title">
								{form.tx_powermail_fieldsets}
							</td>
							<td nowrap="nowrap" class="col-title">
								{form.tx_powermail_confirm}
							</td>
							<td nowrap="nowrap" class="col-title">
								{form.tx_powermail_multiple}
							</td>
						</tr>
					</f:for>
					</tbody>
				</table>
			</f:then>
			<f:else>
				<strong>
					<f:translate key="BackendConverterNoOldForms">No old Forms found</f:translate>
				</strong>
			</f:else>
		</f:if>
	</div>

</f:section>